Thought experiments enable us to explore often impossible situations and predict their implications and outcomes. It helps to stretch our minds by confronting difficult questions. When empirical evidence is impossible, thought experiments help to think about complex concepts.
The purpose is to encourage speculation, logical thinking and to change paradigms. Thought experiments push us outside our comfort zone by forcing us to confront questions we cannot answer with ease. They reveal that we do not know everything and some things cannot be known.
A classical example of a thought experiment is the 'impossible barber'.
Imagine a small town with a hard-working barber. The barber shaves everyone in the town who does not shave themselves. He does not shave anyone who shaves themselves. So, who shaves the barber?
The Oxford Reference refers to this as the Barber's Paradox.
A village has a barber in it, who shaves all and only the people who do not shave themselves. Who shaves the barber? If he shaves himself, then he does not, but if he does not shave himself, then he does. The paradox is actually just a proof that there is no such barber, or in other words, that the condition is inconsistent.
Albert Einstein used thought experiments for some of his most important discoveries. The most famous of this thought experiments was on a beam of light, which was made into a brilliant children’s book. What would happen if you could catch up to a beam of light as it moved he asked himself? The answers led him down a different path toward time, which led to the special theory of relativity.
Several key types of thought experiment have been identified:
From: Thought Experiment: How Einstein Solved Difficult Problems - Farnam Street